package com.ansion.commonchat.contact.bean;

import androidx.annotation.Keep;

import com.ansion.view.pin_view.PinnedHeaderAdapter;


/**
 * 联系人 header A，B，C，D，……，Z，#
 */
@Keep
public class ContactHeaderBean extends ContactBaseBean {
    public String cateTitle;
    public boolean isNeedPosition;

    @Override
    public int getType() {
        return PinnedHeaderAdapter.PIN_TYPE;
    }

    public ContactHeaderBean(String cateTitle, boolean needPosition) {
        this.cateTitle = cateTitle;
        this.isNeedPosition = needPosition;
        setUniqueTag(PinnedHeaderAdapter.PIN_TYPE + cateTitle);
        type = PinnedHeaderAdapter.PIN_TYPE;
        diffContent = cateTitle;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ContactHeaderBean)) {
            return false;
        }
        ContactHeaderBean that = (ContactHeaderBean) o;
        return type == that.type && diffContent.equals(that.diffContent);
    }


}
